﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VietPay.KooBoo.Business.Models.BatchListViewModel>" %>
<%@ Import Namespace="VietPay.KooBoo.Business.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script type="text/javascript">
    $(function () {
        $("#datepickerFrom").datepicker();
        $("#datepickerTo").datepicker();
    });
	</script>

<div class="screen-content">
<form method="post" action="/Batch/Index">
<fieldset>
<div>
    <h2>Quản lý kho hàng</h2>
</div>
<div>
<fieldset>
<table id="idSearch">
  <tr>
    <td class="label">Ngày nhập:</td>
    <td class="label">Từ ngày:</td>
    <td><input name="dtpFromCreateDate" type="text" id="datepickerFrom" value=""/></td>
    <td class="label">Đến ngày:</td>
    <td><input name="dtpToCreateDate" type="text" id="datepickerTo" value=""/></td>
  </tr>
  <tr>
    <td class="label">Mã lô:</td>
    <td><input name="batchCode" type="text" value=""/></td>
  </tr>  
  <tr>
    <td class="label">Loại sản phẩm:</td>
    <td>
    <%=Html.DropDownList("CategoryID", new SelectList((List<CategoryViewModel>)ViewData["ListCategoryView"], "ID", "CategoryName"), "-- Danh mục --", null)%>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" value="Tìm" class="btn"/></td>
  </tr>
  
</table>
</fieldset>
</div>
</fieldset>
<fieldset>
<table class="form-table border-collapse" id="tbl-result" width="100%">
  <tr>
    <th width="20%">Mã lô</th>
    <th width="20%">loại sản phẩm</th>
    <th width="20%">Ngày nhập</th>
    <th width="20%">Số lượng</th>
    <th>Trạng thái</th>
    <th width="35">&nbsp;</th>
  </tr>
  
     <% if (Model!=null && Model.BatchSearchList != null)
        {%>
     
     <% foreach (var item in Model.BatchSearchList)
        { %>
        <tr>
            <td>
                <%: Html.ActionLink(item.BatchCode, "Index", "BatchDetail", new { batchID = item.BatchID,batchCode=item.BatchCode }, null)%> 
            </td>
            <td>
                <%: item.CategoryName%>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreatedDate)%>
            </td>
            <td>
                0
            </td>
            <td>
                <%: item.StatusValue%>
            </td>
        </tr>  
    <% }
        } %>
</table>
</fieldset>
</form>
</div>
</asp:Content>

